public class Emp {

	private int eNo;
	private String eName;
	/**
	 * @return the eName
	 */
	public String geteName() {
		return eName;
	}
	/**
	 * @param eName the eName to set
	 */
	public void seteName(String eName) {
		this.eName = eName;
	}
	/**
	 * @return the eNo
	 */
	public int geteNo() {
		return eNo;
	}
	/**
	 * @param eNo the eNo to set
	 */
	public void seteNo(int eNo) {
		this.eNo = eNo;
	}
	
	@Override
	public boolean equals(Object obj) {
		// TODO Auto-generated method stub
		
		Emp e = (Emp)obj;
		
		return this.eNo == e.geteNo();
	}
	
	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return this.eNo;
	}
	
}
class Mainclass {
	
	public static void main(String[] args) {
		
		Emp e1 = new Emp();
		Emp e2 = new Emp();
		e1.seteNo(100);
		e2.seteNo(100);
		System.out.println(e1.equals(e2));
		System.out.println(e1.hashCode());
		System.out.println(e2.hashCode());
		
		
		
		
	}
}